<ActivityView v-deep v-bind="$attrs">
    <ActivityTitle is-app-title>选择转储文件</ActivityTitle>
    <ActivityBody style="display: flex; flex-direction: column;" @dragover.prevent @drop.prevent="processFileDrop">
        <div class="fileSelector" v-deep>
            <ElCard>
                <template #header>
                    选择转储文件 (拖放到此处可以快速添加)
                </template>
            
                <ElTooltip placement="bottom" content="注意：手动勾选的文件在更换筛选词后不会被自动清除选中！切勿误删您的文件！"><div style="display: flex; white-space: nowrap; align-items: center; font-size: small;">
                    <span>筛选：</span><ElInput v-model=filterValue size="small" placeholder="输入文本即可筛选" clearable @keydown.stop />
                    <span style="margin-left: 0.5em;">当前已手动选中 {{dumpfile.length}} 项</span>
                </div></ElTooltip>
                <ElCheckbox v-model="dumpfileShowAutodump" :disabled="!canContinue">显示自动保存的项</ElCheckbox>
                <ElCheckbox v-model="dumpfileSelectAll" :disabled="!canContinue">全选 ({{dumpfilesWithFilter.length}})</ElCheckbox>
                <ElCheckboxGroup :disabled="dumpfileSelectAll" v-model="dumpfile"
                    style="width: 100%; box-sizing: border-box; display: flex; flex-direction: column;">
                    <ElCheckbox v-for="item in dumpfilesWithFilter" :label="item" :value="item" :disabled="!canContinue"></ElCheckbox>
                </ElCheckboxGroup>
            </ElCard>
            
            <div style="display: flex; margin-top: 1em;">
                <ElButton :disabled="!canContinue" style="flex: 1;" @click="selectit(true)" v-show="false">创建</ElButton>
                <ElButton :disabled="!canContinue || (dumpfile.length != 1) || dumpfileSelectAll" type="primary" plain style="flex: 1;" @click="selectit">编辑</ElButton>
                <ElButton :disabled="!canContinue || (dumpfile.length != 2) || dumpfileSelectAll" style="flex: 1;" @click="selectit(compare)">比较</ElButton>
                <ElButton :disabled="!canContinue || dumpfiles.length == 0 || (dumpfile.length == 0 && (!dumpfileSelectAll))" type="danger" plain style="flex: 1;" @click="deleteit">删除</ElButton>
                <ElButton :disabled="!canContinue" @click="userLoadData">刷新列表</ElButton>
            </div>
        </div>
    </ActivityBody>
</ActivityView>